home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
pc
/
LOGIC Apple II 5.25" Library - DOS Part 3
/
DOS077A.dsk
/
PAYMENT SCHEDULE.bas
< prev
next >
Wrap
BASIC Source File
|
2012-02-16
|
4KB
|
91 lines
1 REM THIS PROGRAM USES A PRINTER IN SLOT #1. THERE IS PROVISION TO ENTER A HEADING FOR THE TABLES WHICH WILL BE PRINTED ON THE TABLE.
2 REM IF YOUR PRINTER IS IN A DIFFERENT SLOT CHANGE SLOT # AT LINE 560.
3 REM ALL INTEREST AMOUNTS MUST BE ENTERED AS DECIMALS THAT IS 10% IS ENTERED AS .10 AND 6% IS ENTERED AS .06. INTEREST RATES ARE ANNUAL.
10 TEXT : HOME : VTAB 8
20 PRINT "PAYMENT PROGRAM"
30 PRINT "WRITTEN BY NELSON GOTHIE"
40 PRINT "MAY 1979"
50 FOR A = 1 TO 500
60 NEXT A
70 HOME : VTAB 8: PRINT "THIS PROGRAM WILL..."
75 CLEAR
80 PRINT : PRINT "1. CALCULATE THE AMOUNT OF THE MONTHLY PAYMENT": PRINT
90 PRINT "2. PREPARE PRINCIPAL INTEREST TABLES": PRINT
100 PRINT "3. CALCULATE THE NUMBER OF MONTHS TO PAY OFF THE DEBT."
105 PRINT : PRINT "TO EXIT PROGRAM ENTER 4"
110 PRINT : PRINT "ENTER THE NUMBER OF THE PORTION DESIRED": INPUT B
120 IF B = 1 GOTO 200
130 IF B = 2 GOTO 400
140 IF B = 3 GOTO 600
145 IF B = 4 GOTO 1000
150 PRINT : INVERSE : PRINT "YOU MUST ENTER A NUMBER BETWEEN 1 AND 3": NORMAL : GOTO 80
200 HOME : VTAB 8: PRINT "CALCULATION OF MONTHLY PAYMENT"
210 PRINT : PRINT "ENTER THE ANNUAL INTEREST RATE": INPUT AIR
220 PRINT : PRINT "ENTER THE TOTAL AMOUNT TO BE FINANCED": INPUT TAF
230 PRINT : PRINT "ENTER THE NUMBER OF MONTHS OF THE LOAN": INPUT NM
240 REM PAYMENT=PRINCIPAL TIMES INTEREST PER MONTH DIVIDED BY 1-(1+MONTHLY INT)RAISED TO THE -NM POWER
250 MI = AIR/12
260 C = (1 +MI) ^ -NM
270 PAY = TAF *(MI/(1 -C))
274 PAY = INT(PAY *100 +.5)/ INT(100 +.5)
280 PRINT : PRINT "THE MONTHLY PAYMENT IS ...$";PAY
290 PRINT : PRINT "WOULD YOU LIKE A PRINCIPAL-INTERST TABLE? Y/N": INPUT Q$
300 IF Q$ = "N" THEN 70
305 MP = PAY
307 AF = TAF
310 IF Q$ = "Y" THEN 452
400 HOME : VTAB 8
410 PRINT "THIS PORTION PREPARES PRINCIPAL AND INTEREST TABLES"
420 PRINT : PRINT "ENTER THE AMOUNT TO BE FINANCED": INPUT AF
430 PRINT : PRINT "ENTER THE ANNUAL INTEREST RATE EG .08": INPUT AIR
440 PRINT : PRINT "ENTER THE MONTHLY PAYMENT": INPUT MP
450 IF AF *(AIR/12) > = MP THEN GOTO 590
452 GOSUB 800
453 PRINT : PRINT "DO YOU WANT A PRINTED RECOED? Y/N": INPUT P$: IF P$ = "Y" THEN GOSUB 560
454 PRINT : PRINT "NO" SPC( 2)"INTEREST","PRINCIPAL" SPC( 7)"BALANCE"
455 N = 0
460 I = AF *(AIR/12)
470 P = MP -I
480 AF = AF -P
482 J = INT((I *100) +.5)/100
484 R = INT(AF *100)/100
485 N = N +1
486 Q = INT(P *100)/100
490 PRINT N SPC( 3)J,Q,R
492 IF AF = 0 THEN GOTO 545
495 IF AF *(AIR/12) +AF < = MP THEN GOTO 510
500 GOTO 460
510 I = AF *(AIR/12)
520 P = AF
530 AF = 0
540 GOTO 482
545 PRINT : PRINT "THE LAST PAYMENT IS.."J +Q
547 PR# 0
550 PRINT : PRINT "TO RETURN TO INDEX ENTER ANY LETTER": INPUT Q$: GOTO 70
560 PR# 1
565 PRINT "PRINCIPAL AND INTEREST TABLE"
567 PRINT : PRINT HEAD$
570 PRINT : PRINT "THIS TABLE REDUCES $"AF SPC( 1)"AT" SPC( 1)AIR *100;"% PER YEAR" SPC( 1)"PAYABLE AT $";MP SPC( 1)"PER MONTH."
575 RETURN
590 PRINT : INVERSE : PRINT "THE MONTHLY PAYMENT WILL NOT REDUCE THE LOAN": NORMAL : GOTO 410
600 HOME : VTAB 8
610 PRINT "THIS SECTION CALCULATES THE NUMBER OF MONTHS REQUIRED TO PAY OFF A LOAN"
620 PRINT : PRINT "ENTER THE AMOUNT OF THE LOAN": INPUT AF
630 PRINT : PRINT "ENTER THE RATE OF INTEREST EG .08": INPUT AIR
640 PRINT : PRINT "ENTER THE DESIRED MONTHLY PAYMENT": INPUT MP
650 IF AF *(AIR/12) > = MP THEN PRINT "THE MONTHLY PAYMENT IS NOT LARGE ENOUGH TO REDUCE THE LOAN"
660 IF AF *(AIR/12) > = MP GOTO 610
670 K = MP/(MP -(AF *(AIR/12)))
680 C = 1 +(AIR/12)
690 FOR X = INT(AF/MP) TO 1000
700 Y = C ^X
710 IF 1000 *Y > = 1000 *K GOTO 730
720 NEXT X
725 PRINT
730 PRINT "THE LOAN WILL REDUCE IN "X" PAYMENTS"
740 PRINT : PRINT "WOULD YOU LIKE A PRINCIPAL-INTEREST TABLE? Y/N": INPUT Q$
750 IF Q$ = "N" THEN 70
760 IF Q$ = "Y" THEN 452
800 PRINT : PRINT "IF YOU WISH A HEADIND FOR THIS SCHEDULE ENTER THE HEADING. IF NOT ENTER 'N'": INPUT HEAD$: IF HEAD$ = "N" THEN HEAD$ = ""
810 RETURN
1000 END